<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%
	String contextPath = request.getContextPath();
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<title><%=com.sad.util.G.system.systemName%></title>
	<link rel="stylesheet" type="text/css" href="<%=contextPath%>/styles/base.css">
		<link rel="stylesheet" type="text/css" href="<%=contextPath%>/styles/cas.css">
			<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
<body onload="if (document.getElementById('userId')) document.getElementById('userId').focus()">
	<div class="panel">
		<div class="contentpanel">

			<div class="formpanel">
				<div style="padding-bottom: 50px; font-size: 28px; color: #ffffff;">
					&nbsp;&nbsp;<%=com.sad.util.G.system.systemName%></div>
				<form class="login" method="post" action="<%=contextPath%>/login" id="login-form">
					<%
						String msg = (String) request.getAttribute("message");
						if (msg != null && !"".equals(msg)) {
					%>
					<p style="padding-bottom: 2px;">
						<img src="<%=contextPath%>/styles/images/error.png" style="vertical-align: middle;">&nbsp;&nbsp;<span style="color: #FD6A6C; vertical-align: middle;">用户名或密码错误</span>
					</p>
					<%
						}
					%>

					<p>
						<span class="input-bg"> <input name="username" id="userId" placeholder="用户名" autocomplete="on" type="text" value="admin"></span>
					</p>
					<p>
						<span class="input-bg"> <input name="password" id="passWord" placeholder="密码" type="password" value="123"></span>
					</p>
					<p class="btnpanel" style="vertical-align: middle;">
						<input value="登&nbsp;&nbsp;录" class="submit" id="login-submit" accesskey="l" type="button" style="width: 280px;" onclick="login();">
					</p>
				</form>
			</div>
		</div>
	</div>
	<div class="footer">
		<p>
			<span><%=com.sad.util.G.system.systemName%> Copyright©2015 All Rights Reserved</span>
		</p>
	</div>
	</div>
</body>
<script type="text/javascript">
	function login() {
		if (document.getElementById("userId").value == "") {
			alert("请输入用户名");
			return;
		}
		if (document.getElementById("passWord").value == "") {
			alert("请输入密码");
			return;
		}

		document.getElementById("login-form").submit();
	}

	document.onkeydown = function(e) {
		if (!e)
			e = window.event;//火狐中是 window.event
		if ((e.keyCode || e.which) == 13) {
			login();
		}
	}
</script>

</html>